package com.github.jspxnet.worktask.table;

import com.github.jspxnet.enums.YesNoEnumType;
import com.github.jspxnet.sober.annotation.Column;
import com.github.jspxnet.sober.annotation.Id;
import com.github.jspxnet.sober.annotation.Table;
import com.github.jspxnet.utils.DateUtil;
import com.github.jspxnet.utils.StringUtil;
import com.github.jspxnet.worktask.model.enums.SupervisePowerEnumType;
import com.github.jspxnet.worktask.model.enums.TaskTipEnumType;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by jspx.net
 * author: chenYuan
 * date: 2021/9/28 0:31
 * description: jspx-framework
 *
 * 查询 flowNo 流程编号 和 文档编号 得到独立的文档配置权限
 **/

@Table(name = "jwf_document_flow_conf", caption = "文档独立配置")
@Data
public class DocumentFlowConf implements Serializable {
    @Id
    @Column(caption = "ID", notNull = true)
    private long id = 0;

    @Column(caption = "流程编号", length = 32, notNull = true)
    private String flowNo = StringUtil.empty;

    @Column(caption = "文档编号", length = 100, notNull = true)
    private String documentNo = StringUtil.empty;

    //默认配置-----------begin
    @Column(caption = "提醒方式",option = "0:不提醒")
    private int taskTipType = TaskTipEnumType.NONE.getValue();

    @Column(caption = "归档",length = 2)
    private int canArchive = YesNoEnumType.YES.getValue();

    @Column(caption = "允许修改附件",length = 2)
    private int canEditAttachment = YesNoEnumType.YES.getValue();

    @Column(caption = "允许修改流程",length = 2)
    private int canModifyFlow = YesNoEnumType.YES.getValue();

    @Column(caption = "允许空意见",length = 2)
    private int canEmptyOpinion  = YesNoEnumType.YES.getValue();

    @Column(caption = "收到文件后几分钟提醒一次",option = "0:不提醒")
    private int tipMinute = 48;

    @Column(caption = "超时提醒次数",  notNull = true)
    private int tipRepeat = 1;

    //流程期限
    @Column(caption = "流程期限")
    private Date limitDate = null;

    @Column(caption = "到期限后是否终结",option = "0:一直等待")
    private int limitDateEnd = YesNoEnumType.NO.getValue();

    @Column(caption = "督办人员", length = 4000)
    private String superviseUsers = StringUtil.empty;

    @Column(caption = "督办权限")
    private int supervisePower = SupervisePowerEnumType.NONE.getValue();

    //默认配置-----------end
}
